<?php
App::uses('AppController', 'Controller');
/**
 * HistoricoEmprestimos Controller
 *
 * @property HistoricoEmprestimo $HistoricoEmprestimo
 */
class HistoricoEmprestimosController extends AppController {


/**
 * index method
 *
 * @return void
 */
	public function lista() {
		$this->Assunto = ClassRegistry::init('Assunto');
		$this->HistoricoEmprestimo->recursive = 0;
		if($this->admin())
			$this->set('historicoEmprestimos', $this->paginate());
		else
			$this->set('historicoEmprestimos', $this->paginate(array('alunos_id'=>$this->usuarioAtual['id_alunos'])));
		$this->set('assuntos', $this->Assunto->find('list', array('fields'=>'codigo_prefix'))); 
		$this->render('index');
	}
}
